// BottomCtrol.cpp: implementation of the CBottomCtrol class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "PerSim.h"
#include "BottomCtrol.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CBottomCtrol::CBottomCtrol()
{

}

CBottomCtrol::~CBottomCtrol()
{

}


BEGIN_MESSAGE_MAP(CBottomCtrol, CBCGPDockingControlBar)
//{{AFX_MSG_MAP(CMyBarBottom)
ON_WM_CREATE()
ON_WM_SIZE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()
int CBottomCtrol::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CBCGPDockingControlBar::OnCreate(lpCreateStruct) == -1)
		return -1;

	
	CRect rectDummy;
	rectDummy.SetRectEmpty ();
	
	// Create tabs window:
	if (!m_wndTabs.Create (CBCGPTabWnd::STYLE_FLAT, rectDummy, this, 1))
	{
		TRACE0("Failed to create output tab window\n");
		return -1;      // fail to create
	}
	m_wndTabs.SetFlatFrame (FALSE, FALSE);	

	/*

   m_pGeoPage = new CGeometryPage() ;
   m_pGeoPage->Create(IDD_DIALOG_TEXTURE,NULL) ;
   
   m_pTexPage = new CTexPage ;
   m_pTexPage->Create(IDD_DIALOG_GEOMETRY,NULL) ;
 
   m_pSematicPage = new CSematicDlg() ;
   m_pSematicPage->Create(IDD_DIALOG_SEMANTIC,NULL) ;

   m_wndTabs.AddTab(m_pGeoPage,_T("Geometry page"),0) ;
   m_wndTabs.AddTab(m_pTexPage,_T("Texture Page"),1) ;
   m_wndTabs.AddTab(m_pSematicPage,_T("Sematic Page"),0) ;

   m_pSematicPage->ShowWindow(SW_SHOW) ;
   m_pGeoPage->ShowWindow(SW_SHOW) ;
   m_pTexPage->ShowWindow(SW_SHOW) ;

   */
	return 0;
}

void CBottomCtrol::OnSize(UINT nType, int cx, int cy) 
{
	CBCGPDockingControlBar::OnSize(nType, cx, cy);
	
	// Tab control should cover a whole client area:
	
	m_wndTabs.SetWindowPos (NULL, -1, -1, cx, cy,
			SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER);
	//m_pGeoPage->SetWindowPos(NULL,10,500,1024,150,SWP_NOZORDER);
//	m_pTexPage->SetWindowPos(NULL,10,500,1024,150,SWP_NOZORDER);

}





